package com.nie.orderfood.exception;

import com.nie.orderfood.enums.ResultEnum;

/**
 * @program: orderfood
 * @description: 购买异常处理
 * @author: NieMiao
 * @create: 2018-10-10 11:36
 **/
public class SellException extends RuntimeException {

    private Integer code;

    public SellException (ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public SellException (Integer code,String message) {
        super(message);
        this.code = code;
    }
}
